<% if Spree::AuthenticationMethod.active_authentication_methods? %>
<% @body_id = 'login' %>
<div id="existing-customer">
  <table>
    <tr>
      <% if @user.anonymous? %>
        <%= render :partial => 'spree/shared/social_registrations', :locals => {:user => @user, :omniauth => @omniauth} %>
      <% end %>
    </tr>
  </table>

  <% if @user.user_authentications %>
    <% unless @user.user_authentications.empty? %>
      <p><strong><%= t(:you_have_signed_in_with_these_services) %>:</strong></p>
      <div class="authentications">
        <% for user_authentication in @user.user_authentications %>
          <div class="authentication">
            <%= image_tag "store/#{user_authentication.provider}_32.png", :size => "32x32", :class => "columns" %>
            <div class="provider columns two"><h6><%= user_authentication.provider %></h6></div>
            <%= link_to image_tag("red_x.png",:alt=>"X"), user_authentication, :confirm => "#{t(:remove_authentication_option_confirmation)}", :method => :delete, :class => "remove" %>
          </div>
        <% end %>
        <div class="clear"></div>
      </div>
    <% end %>

  <% end %>
  <%= content_tag(:p, content_tag(:strong, t(:add_another_service_to_sign_in_with))) if Spree::AuthenticationMethod.available_for(@user).exists? %>
  <%= render :partial => "spree/shared/social" %>
</div>

<div class="clear"></div>
<% end %>
